package com.zhkc.wisdom.common.base;

import com.zhkc.wisdom.common.base.util.SpringContextHolder;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;


@Configuration
@Slf4j
public class CommonAutoConfiguration implements ApplicationContextAware {

	@PostConstruct
	public void init() {
		log.info("init CommonAutoConfiguration...");
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {

		SpringContextHolder.setApplicationContext(applicationContext);
	}

}
